package org.langcom.logic;

import java.util.Collection;

public class LogicObject extends AbstractLogic {

	private static final long serialVersionUID = -4482543302719983905L;
	protected Object input;

	public LogicObject(Object input, String description, String detailedDescription) {
		super(description, detailedDescription);
		setInput(input);
	}

	public boolean tryOn() throws Exception {
		if (input instanceof Collection) {
			return ((Collection<?>) input).size() > 0;
		}
		return input != null;
	}

	public Object getInput() {
		return input;
	}

	public void setInput(Object input) {
		this.input = input;
	}
}
